<form action="" id="myform">
<?php foreach ($find_contract as $contract_item): ?>
<div id="inline1">
<h2><span>外签合同信息</span></h2>
<table>
    <tr><th colspan="7">基本信息：</th></tr>
    <tr>
        <td class="name" width="80">主题：</td>
        <td>&nbsp;</td>
        <td colspan="5"  id="customer_name"><?= $contract_item->subject ?></td>
    </tr>
    <tr>
        <td class="name" width="80">供应商：</td>
        <td>&nbsp;</td>
        <td colspan="5"><?= $contract_item->suppliers_name ?></td>
    </tr>
    <tr>
        <td class="name" width="80" >合同号：</td>
        <td>&nbsp;</td>
        <td width="170"><?= $contract_item->contract_no ?></td>
        <td>&nbsp;</td>
        <td class="name" width="80" style="padding-left:0px;">总金额：</td>
        <td>&nbsp;</td>
        <td width="170"><?php if($contract_item->total_amount):?><?php echo $contract_item->total_amount;?> 万元<?php endif;?> </td>
    </tr>
    <tr>
        <td class="name" width="80" >付款方式：</td>
        <td>&nbsp;</td>
        <td width="170"><?= $contract_item->payment_type ?></td>
        <td>&nbsp;</td>
        <td class="name" width="80">交付地点：</td>
        <td>&nbsp;</td>
        <td width="170"><?= $contract_item->payment_address ?></td>
    </tr>
    <tr>
        <td class="name" width="80" >开始时间：</td>
        <td>&nbsp;</td>
        <?php 
        	$starttime = '';
        	if($contract_item->start_time != '0000-00-00 00:00:00'){
            	$starttime = substr ( $contract_item->start_time, 0, 10 );
        	}
        ?>
        <td width="170"><?= $starttime  ?></td>
        <td>&nbsp;</td>
        <td class="name" width="80">结束时间：</td>
        <td>&nbsp;</td>
        <?php 
        	$endtime = '';
        	if($contract_item->end_time != '0000-00-00 00:00:00'){
        		$endtime = substr ( $contract_item->end_time, 0, 10 );
        	}
        	?>
        <td width="170"><?= $endtime ?></td>
    </tr>
    <tr>
        <td class="name" width="80" >产品：</td>
        <td>&nbsp;</td>
        <td colspan="5"><?= $contract_item->product ?></td>
    </tr>
    <tr>
        <td class="name" width="80">客户签约人：</td>
        <td>&nbsp;</td>
        <td width="170"><?= $contract_item->customer_contract ?></td>
        <td>&nbsp;</td>
        <td class="name" width="80" >我方签约人：</td>
        <td>&nbsp;</td>
        <td width="170"><?= $contract_item->our_contract ?></td>
    </tr>
    <tr>
        <td class="name" width="80">所有者：</td>
        <td>&nbsp;</td>
        <td width="170"><?= $contract_item->user_name ?></td>
        <td>&nbsp;</td>
        <td class="name" width="80" >签约时间：</td>
        <td>&nbsp;</td>
        <?php 
        	$signingtime = '';
        	if($contract_item->signing_time != '0000-00-00 00:00:00'){
        		$signingtime = substr ( $contract_item->signing_time, 0, 10 );
        	}
        ?>
        <td width="170"><?= $signingtime ?></td>
    </tr>
    <tr><th colspan="7">执行状态：</th></tr>
    <tr>
        <td class="name" width="80" >状态：</td>
        <td>&nbsp;</td>
        <td width="170"><?= $contract_item->status ?></td>
    </tr>
    <tr><th colspan="7">其他：</th></tr>
    <tr>
        <td class="gj_name" width="80">合同正文及附件</td>
        <td>&nbsp;</td>
        <td height="80" colspan="5" valign="top">
        <a href="index.php/outside_contract/download/<?= $contract_item->contract_id ?>"><?= $contract_item->real_file_name ?></a>
        </td>
    </tr>
    <tr>
        <td class="gj_name" width="80">备注</td>
        <td>&nbsp;</td>
        <td height="80" colspan="5" valign="top"><?= $contract_item->remark ?></td>
    </tr>
    <tr><td colspan="5">&nbsp;</td></tr>
</table>
</div>
 <?php endforeach; ?>
 </form>